/**
 * Class: Attractor
 *
 * Purpose: 
 *
 * Created: Jan 27, 2010 @ 9:41:46 AM
 * @author Ken Scott
 */
package org.openfantasia.ps.modifier.forces;

import org.openfantasia.ps.modifier.Force;
import org.openfantasia.ps.particle.Particle;
import org.openfantasia.util.math.DPoint3;

public class Attractor extends Force {

	private DPoint3 direction = new DPoint3(0, 1, 0);


	public Attractor() {
	}


	public Attractor(DPoint3 direction) {
		this.direction = direction;
	}


	public DPoint3 getDirection() {
		return direction;
	}


	public void setDirection(DPoint3 direction) {
		this.direction = direction;
	}


	public void act(Particle particle) {
		particle.applyForce(direction.copy().neg());
	}
}
